home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / snippet.exe / GETKEY.C < prev    next >
C/C++ Source or Header  |  1992-04-26  |  394b  |  21 lines

  1. /*
  2. **  Originally published as part of the MicroFirm Function Library
  3. **
  4. **  Copyright 1986, S.E. Margison
  5. **  Copyright 1989, Robert B.Stout
  6. **
  7. **  Subset version released to the public domain, 1990
  8. */
  9.  
  10. #include <stdio.h>
  11.  
  12. int getkey(void)
  13. {
  14.         int i;
  15.  
  16.         if ((i = (int)getch()) != 0)
  17.                 return(i);
  18.         i = (int)getch();
  19.         return(i+256);
  20. }
  21.